﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Reflection;
using System.Diagnostics;

namespace ControlsLib.SplashScreen
{
    public partial class SplashScreenFormBase : Form, ISplashForm
    {
        public SplashScreenFormBase()
        {
            InitializeComponent();

            //Assembly assembly = Assembly.GetExecutingAssembly();
            //FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
            //string version = fileVersionInfo.ProductVersion;

            //this.lblProductName.Text = string.Format("Product Name: {0}", fileVersionInfo.ProductName);
            //this.lblProductVersion.Text = string.Format("Product Version: {0}", version);

            //this.lblProductName.Text = ProductName; // string.Format("Product Name: {0}", fileVersionInfo.ProductName);
            //this.lblProductVersion.Text = ProductVersion; // string.Format("Product Version: {0}", version);
        }


        public SplashScreenFormBase(Assembly assembly)
        {
            InitializeComponent();

            FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
            string version = fileVersionInfo.ProductVersion;

            this.lblProductName.Text = string.Format("Product Name: {0}", fileVersionInfo.ProductName);
            this.lblProductVersion.Text = string.Format("Product Version: {0}", version);
        }

        public void UpdateStatus(string status)
        {
            
        }

        public void UpdateProgress(int progress)
        {
            
        }

        public void UpdateInfo(string info)
        {
            this.lblMessage.Text = info;
        }
    }
}
